package com.partner.boot.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.partner.boot.common.LDTConfig;
import lombok.Getter;
import lombok.Setter;

/**
* <p>
* 
* </p>
*
* @author 菜牙买菜
* @since 2023-07-05
*/
@Getter
@Setter
@TableName("scenic_spot")
@ApiModel(value = "ScenicSpot对象", description = "")
public class ScenicSpot implements Serializable {

private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @Alias("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("景区名称")
    @Alias("景区名称")
    private String name;

    @ApiModelProperty("景区位置")
    @Alias("景区位置")
    private String address;

    @ApiModelProperty("开放时间")
    @Alias("开放时间")
    private String opentime;

    @ApiModelProperty("联系电话")
    @Alias("联系电话")
    private String phone;

    @ApiModelProperty("介绍")
    @Alias("介绍")
    private String intro;

    @ApiModelProperty("等级")
    @Alias("等级")
    private Float crade;

    @ApiModelProperty("热度")
    @Alias("热度")
    private Float hot;

    @ApiModelProperty("排序")
    @Alias("排序")
    private Integer sort;

    @ApiModelProperty("开放状态")
    @Alias("开放状态")
    private Boolean status;

    @ApiModelProperty("总评论数")
    @Alias("总评论数")
    private Integer sum;

    @ApiModelProperty("创建时间")
    @Alias("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonDeserialize(using = LDTConfig.CmzLdtDeSerializer.class)
    @JsonSerialize(using = LDTConfig.CmzLdtSerializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @Alias("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonDeserialize(using = LDTConfig.CmzLdtDeSerializer.class)
    @JsonSerialize(using = LDTConfig.CmzLdtSerializer.class)
    private LocalDateTime updateTime;

    @ApiModelProperty("逻辑删除")
    @Alias("逻辑删除")
    @TableLogic(value = "0", delval = "id")
    private Integer deleted;
}